mudbox::TreeNode Class Reference

#include <treenode.h>

Inheritance diagram for mudbox::TreeNode:

Inheritance graph
[legend]
List of all members.

Detailed Description

This class is the base of all node types that can be structured in a hierarchy.

Public Member Functions

virtual const mudbox::ClassDesc RuntimeClass (void) const
  TreeNode (void)
  ~TreeNode (void)
virtual void  Serialize (Stream &s)
virtual void  AddChild (TreeNode *pChild, bool bFirst=false) const
  Adds a node/subtree to the list of children. The added node will be removed from the current parent if it has one.
virtual void  RemoveChild (TreeNode *pChild) const
  Removes a node/subtree from the list of children.
virtual TreeNode FirstChild (void) const
  Returns the first node from the child list.
virtual TreeNode Parent (void) const
  Returns the parent node.
virtual TreeNode NextSibling (void) const
  Returns the next linked node with the same parent.
virtual TreeNode PrevSibling (void) const
  Returns the previous linked node with the same parent.
virtual TreeNode ChildByClass (const ClassDesc *pClass, bool bAutoCreate=true) const
  Returns the first child with the specified type. When the bAutoCreate parameter is true and such a child does not exists, it creates it with the preferred descedant type.
template<typename type>
type *  ChildByClass (bool bAutoCreate=true) const
  Same as above, a most confortable version.
virtual TreeNode ChildByClass (const ClassDesc *pClass, unsigned int iIndex=0) const
  Returns the first child with the specified type, or returns zero if no child found.
template<typename type>
type *  ChildByClass (unsigned int iIndex=0) const
  Same as above, a most confortable version.
virtual void  DeleteChildByClass (const ClassDesc *pClass)
  Deletes all child which is derived from a specific class.
virtual QString  Info (void) const
  Returns descriptive information about the node.
virtual bool  Visible (void) const
  Returns if the node is visible. Should be overridden in derived classes.
virtual void  SetVisible (bool b)
  Sets the node visibility Should be overridden in derived classes.
virtual bool  Locked (void) const
  Returns if the node is locked. Should be overridden in derived classes.
virtual void  SetLocked (bool b)
  Sets the locking of the node. Should be overridden in derived classes.
virtual void  OnLinked (const TreeNode *pOldParent)
  This function is called then the node is linked to a new parent.

Static Public Member Functions

const mudbox::ClassDesc StaticClass (void)
mudbox::Node CreateInstances (unsigned int iCount=1)

Constructor & Destructor Documentation

mudbox::TreeNode::TreeNode void   ) 
 
mudbox::TreeNode::~TreeNode void   ) 
 

Member Function Documentation

virtual const mudbox::ClassDesc* mudbox::TreeNode::RuntimeClass void   )  const [inline, virtual]
 

Reimplemented from mudbox::Node.

Reimplemented in mudbox::BrushMask, mudbox::BrushStamp, mudbox::BrushStencil, mudbox::Camera, mudbox::Geometry, mudbox::Layer, mudbox::LayerContainer, mudbox::LayerMeshData, mudbox::Light, mudbox::Material, mudbox::Mesh, mudbox::TangentGenerator, mudbox::Picker, mudbox::MeshGrid, mudbox::SurfaceSmoother, mudbox::NURBSCurve, mudbox::MeshRenderer, mudbox::VertexDataProvider, mudbox::Scene, mudbox::SelectionSet, mudbox::SubdivisionLevel, mudbox::GroupNode, mudbox::Transformation, mudbox::TransformationPalette, mudbox::ViewPortFilter, and mudbox::ViewPort.

00047 { return dynamic_cast<type *>( ChildByClass( type::StaticClass(), bAutoCreate ) ); };
const mudbox::ClassDesc* mudbox::TreeNode::StaticClass void   )  [static]
 

Reimplemented from mudbox::Node.

Reimplemented in mudbox::BrushMask, mudbox::BrushStamp, mudbox::BrushStencil, mudbox::Camera, mudbox::Geometry, mudbox::Layer, mudbox::LayerContainer, mudbox::LayerMeshData, mudbox::Light, mudbox::Material, mudbox::Mesh, mudbox::TangentGenerator, mudbox::Picker, mudbox::MeshGrid, mudbox::SurfaceSmoother, mudbox::NURBSCurve, mudbox::MeshRenderer, mudbox::VertexDataProvider, mudbox::Scene, mudbox::SelectionSet, mudbox::SubdivisionLevel, mudbox::GroupNode, mudbox::Transformation, mudbox::TransformationPalette, mudbox::ViewPortFilter, and mudbox::ViewPort.

mudbox::Node* mudbox::TreeNode::CreateInstances unsigned int  iCount = 1  )  [static]
 

Reimplemented from mudbox::Node.

Reimplemented in mudbox::BrushMask, mudbox::BrushStamp, mudbox::BrushStencil, mudbox::Camera, mudbox::Geometry, mudbox::Layer, mudbox::LayerContainer, mudbox::LayerMeshData, mudbox::Light, mudbox::Material, mudbox::Mesh, mudbox::TangentGenerator, mudbox::Picker, mudbox::MeshGrid, mudbox::SurfaceSmoother, mudbox::NURBSCurve, mudbox::MeshRenderer, mudbox::VertexDataProvider, mudbox::Scene, mudbox::SelectionSet, mudbox::SubdivisionLevel, mudbox::GroupNode, mudbox::Transformation, mudbox::TransformationPalette, mudbox::ViewPortFilter, and mudbox::ViewPort.

virtual void mudbox::TreeNode::Serialize Stream s  )  [virtual]
 

Reimplemented from mudbox::Node.

Reimplemented in mudbox::LayerContainer, mudbox::NURBSCurve, mudbox::SelectionSet, and mudbox::Topology.

virtual void mudbox::TreeNode::AddChild TreeNode pChild,
bool  bFirst = false
const [virtual]
 

Adds a node/subtree to the list of children. The added node will be removed from the current parent if it has one.

virtual void mudbox::TreeNode::RemoveChild TreeNode pChild  )  const [virtual]
 

Removes a node/subtree from the list of children.

virtual TreeNode* mudbox::TreeNode::FirstChild void   )  const [virtual]
 

Returns the first node from the child list.

virtual TreeNode* mudbox::TreeNode::Parent void   )  const [virtual]
 

Returns the parent node.

virtual TreeNode* mudbox::TreeNode::NextSibling void   )  const [virtual]
 

Returns the next linked node with the same parent.

virtual TreeNode* mudbox::TreeNode::PrevSibling void   )  const [virtual]
 

Returns the previous linked node with the same parent.

virtual TreeNode* mudbox::TreeNode::ChildByClass const ClassDesc pClass,
bool  bAutoCreate = true
const [virtual]
 

Returns the first child with the specified type. When the bAutoCreate parameter is true and such a child does not exists, it creates it with the preferred descedant type.

template<typename type>
type* mudbox::TreeNode::ChildByClass bool  bAutoCreate = true  )  const [inline]
 

Same as above, a most confortable version.

00047 { return dynamic_cast<type *>( ChildByClass( type::StaticClass(), bAutoCreate ) ); };
virtual TreeNode* mudbox::TreeNode::ChildByClass const ClassDesc pClass,
unsigned int  iIndex = 0
const [virtual]
 

Returns the first child with the specified type, or returns zero if no child found.

template<typename type>
type* mudbox::TreeNode::ChildByClass unsigned int  iIndex = 0  )  const [inline]
 

Same as above, a most confortable version.

00052 { return dynamic_cast<type *>( ChildByClass( type::StaticClass(), iIndex ) ); };
virtual void mudbox::TreeNode::DeleteChildByClass const ClassDesc pClass  )  [virtual]
 

Deletes all child which is derived from a specific class.

virtual QString mudbox::TreeNode::Info void   )  const [virtual]
 

Returns descriptive information about the node.

virtual bool mudbox::TreeNode::Visible void   )  const [virtual]
 

Returns if the node is visible. Should be overridden in derived classes.

Reimplemented in mudbox::LayerMeshData.

virtual void mudbox::TreeNode::SetVisible bool  b  )  [virtual]
 

Sets the node visibility Should be overridden in derived classes.

Reimplemented in mudbox::LayerMeshData, mudbox::NURBSCurve, mudbox::SelectionSet, and mudbox::ViewPortFilter.

virtual bool mudbox::TreeNode::Locked void   )  const [virtual]
 

Returns if the node is locked. Should be overridden in derived classes.

virtual void mudbox::TreeNode::SetLocked bool  b  )  [virtual]
 

Sets the locking of the node. Should be overridden in derived classes.

virtual void mudbox::TreeNode::OnLinked const TreeNode pOldParent  )  [virtual]
 

This function is called then the node is linked to a new parent.


mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode
mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode mudbox::TreeNode